package com.example.sbbsec;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * Created by Arat.Wu on 2018/10/10.
 */
@Configuration
public class WxPayConfig {

    @Bean
    RestTemplate restTemplate() {
        return new RestTemplate();
    }

    /**
     * 微信支付接口地址
     */
    @Value("${pay.wx.openIdUrl}")
    private String wxPayOpenIdUrl;

    /**
     * 微信支付接口地址
     */
    @Value("${pay.wx.url}")
    private String wxPayUrl;

    /**
     * 微信支付appId
     */
    @Value("${pay.wx.appId}")
    private String wxPayAppId;

    /**
     * 微信支付商户id
     */
    @Value("${pay.wx.mchId}")
    private String wxPayMchId;

    /**
     * 微信支付门户信息
     */
    @Value("${pay.wx.deviceInfo}")
    private String wxPayDeviceInfo;

    /**
     * 微信支付回调地址
     */
    @Value("${pay.wx.notifyUrl}")
    private String wxPayNotifyUrl;

    /**
     * 微信支付:交易类型
     */
    @Value("${pay.wx.tradeType}")
    private String wxPayTradeType;

    /**
     * 微信支付秘钥
     */
    @Value("${pay.wx.key}")
    private String wxPayKey;

    /**
     * 微信app秘钥
     */
    @Value("${pay.wx.appSecret}")
    private String wxAppSecret;

    /**
     * 微信签名类型
     */
    @Value("${pay.wx.signType}")
    private String wxSignType;

    public String getWxPayOpenIdUrl() {
        return wxPayOpenIdUrl;
    }

    public void setWxPayOpenIdUrl(String wxPayOpenIdUrl) {
        this.wxPayOpenIdUrl = wxPayOpenIdUrl;
    }

    public String getWxPayUrl() {
        return wxPayUrl;
    }

    public void setWxPayUrl(String wxPayUrl) {
        this.wxPayUrl = wxPayUrl;
    }

    public String getWxPayAppId() {
        return wxPayAppId;
    }

    public void setWxPayAppId(String wxPayAppId) {
        this.wxPayAppId = wxPayAppId;
    }

    public String getWxPayMchId() {
        return wxPayMchId;
    }

    public void setWxPayMchId(String wxPayMchId) {
        this.wxPayMchId = wxPayMchId;
    }

    public String getWxPayDeviceInfo() {
        return wxPayDeviceInfo;
    }

    public void setWxPayDeviceInfo(String wxPayDeviceInfo) {
        this.wxPayDeviceInfo = wxPayDeviceInfo;
    }

    public String getWxPayNotifyUrl() {
        return wxPayNotifyUrl;
    }

    public void setWxPayNotifyUrl(String wxPayNotifyUrl) {
        this.wxPayNotifyUrl = wxPayNotifyUrl;
    }

    public String getWxPayTradeType() {
        return wxPayTradeType;
    }

    public void setWxPayTradeType(String wxPayTradeType) {
        this.wxPayTradeType = wxPayTradeType;
    }

    public String getWxPayKey() {
        return wxPayKey;
    }

    public void setWxPayKey(String wxPayKey) {
        this.wxPayKey = wxPayKey;
    }

    public String getWxAppSecret() {
        return wxAppSecret;
    }

    public void setWxAppSecret(String wxAppSecret) {
        this.wxAppSecret = wxAppSecret;
    }

    public String getWxSignType() {
        return wxSignType;
    }

    public void setWxSignType(String wxSignType) {
        this.wxSignType = wxSignType;
    }
}
